package com.logisticsserver.listener;

import com.orderserver.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "order_queue")
public class OrderListener {

    @RabbitHandler
    public void handMessage(String orderInfo){
        System.out.println("接收到订单信息：" + orderInfo);
    }

    @RabbitHandler
    public void handMessage(OrderInfo orderInfo){
        System.out.println("接收到订单信息：" + orderInfo);
    }

}
